<template>
	<view>
		<loading :is_init="is_init" :show_time="300"></loading>
		<tabbar></tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				is_init: false
			}
		},
		onLoad() {
			console.log("33333333333: " + JSON.stringify(33333333333));
			this.article_page = 1;
			this.article_init()
		},
		methods: {
			article_init() {
				let that = this;
				let requestParams = {
					page: this.article_page,
				};
				this.Http.post('/plugin.php/banmitongcheng/controller.Article/lists', {
					token: false,
					datalist: requestParams
				}).then(ret => {
					if (ret.data.status == 200) {
						let list = ret.data.data.list.list.data;
						if (that.article_page == 1) {
							this.article_list = list;

						} else {
							if (list.length > 0) {
								for (let i = 0; i < list.length; i++) {
									that.article_list.push(list[i]);
								}
							}
							//少于20条
							if (list < 10) {
								this.article_msg = "没有数据了"
							}
						}

						that.is_init = true;

					}
				})
			},
		}
	}
</script>

<style>

</style>